package xyz.scootaloo.mono.admin.dto

import xyz.scootaloo.mono.data.store.SexOption
import xyz.scootaloo.mono.data.store.UserStatus

/**
 * @author flutterdash@qq.com
 * @since 2021/9/24 12:59
 */

class SexOptionVO(
    val label: String,
    val value: Int
) {
    companion object StaticMethods {
        private fun of(option: SexOption): SexOptionVO = SexOptionVO(option.label, option.code)
        fun list(): List<SexOptionVO> = SexOption.list().map(::of)
    }
}

class StatusOptionVO(
    val label: String,
    val value: Int
) {
    companion object StaticMethods {
        private fun of(status: UserStatus): StatusOptionVO = StatusOptionVO(status.label, status.code)
        fun list(): List<StatusOptionVO> = UserStatus.list().map(::of)
    }
}
